<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <title>Test Script</title>
  <script src="../../dist/eval-dom-scripts.js"></script>
  <script>
    const options = {
      background: "#ccc",
      animation: "opacity 1.5s linear infinite",
      header: {
        height: 40,
        background: "#3388ff",
      },
      includeElement: function (node, draw) {
        // 跳过该节点及其子节点
        if (node.id === "searchWrapper") {
          draw({
            width: 100,
            height: 8,
            left: 0,
            top: 0,
            zIndex: 99999999,
            background: "red",
          });
          return false;
        }
      },
      // 生成骨架屏之前的操作，比如删除干扰节点
      init: function () {
        document
          .querySelectorAll("#commonNav")
          .forEach((item) => item.parentNode.removeChild(item));
      },
    };
    window.evalDOMScripts.apply(window, options).then(res => {
      console.log(res);
    })
  </script>
  <style>
    @keyframes opacity {
      0% {
        opacity: 1
      }

      50% {
        opacity: .5
      }

      100% {
        opacity: 1
      }
    }
  </style>
</head>

<body>
  <div id="app"></div>
  <!-- built files will be auto injected -->


</body>

</html>